package fatboy.hypeerweb;

import junit.framework.Assert;

/**
 * Implementation of NodePointer
 * @author James
 *
 */
class SurrogatePointer extends NodePointer {
	
	public SurrogatePointer(Node newNode){
		super(newNode);
		setTypeOfNode(NodeType.EDGE_NODE);
	}
	
	public int compareTo(NodePointer o){

		return -getNode().compareTo( o.getNode() );

	}

	@Override
	public boolean equals(Object o) {
		Assert.assertTrue(o instanceof NodePointer);
		return getNode().equals( ((NodePointer)o).getNode() );
	}
	@Override
	public int hashCode() {
		return getNode().hashCode();
	}
}
